<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 函数定义
        function sayHello(name){
            return name+',hello'
        }
        // 变量函数  匿名函数
        var nihao = function (){
            console.log('你好')
        }
        // 函数调用
        sayHello()
        console.log(sayHello('tom'))
        console.log(nihao())
    </script>
</body>
</html>